//------------------------------------------------------------------------------
// V2 Screens (styled moved from inline vue styles as they don't load)
//------------------------------------------------------------------------------

// For DragAndDropDebate.vue
.vc-bp-grid {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

// For DraggableAllocation.vue
.vc-chair-flex {
  flex: 0 0 168px; // Don't grow or shrink; remain at fixed width (must match style on chair)
}

// For InlineTeam.vue
.inline-team {
  height: 100%; // Need to fill space
  position: relative; // Need to allow for the seen marker
  border: 5px solid $white; // Placeholder; so doesn't resize with highlights

  &:hover { // Need to override conflict hovers
    background: $purple !important;
    color: $white;
    border-color: darken($purple, 7.5%) !important;
  }

  &.conflictable {
    border-width: 5px; // For conflicts
    border-style: solid;
  }

  .not-live {
    text-decoration: line-through;
  }

  .history-tooltip {
    bottom: 3px;
    font-size: 12px;
  }
}

// AutoSaveCounter.vue
.vc-auto-save {
  min-width: 70px; /* Ensure no resize on save */
}

// DraggableItem.vue
.vue-draggable {
  position: relative; /* For the position of the tooltip */

  .history-tooltip {
    bottom: 1px;
    font-size: 12px;
  }

  .vc-title {
    line-height: 0.9;
    font-size: 1.1rem;
  }

  .vc-number {
    letter-spacing: -3px;
  }

  .vc-subtitle {
    font-weight: normal;
    font-size: 0.65rem;
  }
}

// DragAndDropUnallocatedItems.vue
.vc-resize-handler:hover {
  cursor: ns-resize;
}

// DragAndDropLayout.vue
.vc-header {
  min-height: 118px; /* Need to accomodate messages without resizing vertically */
  margin: 0 -7px; /* Stretch to meet full window width */
  padding-top: 52px; /* Push down notifications below toolbar */
  padding-bottom: 8px; /* Push down notifications below toolbar */

  .alert {
    margin-top: 8px; /* Override default to tighten */
    margin-bottom: 0; /* Use bottom padding as per above */
  }
}

.vc-debates-container {
  padding-bottom: 420px; /* Need to ensure unallocated doesn't overlap; matches its max height */
  margin: 0 -15px; /* Remove the container padding added from base layout */
}

//------------------------------------------------------------------------------
// General Layout
//------------------------------------------------------------------------------

.allocation-actions {

  .navbar {
    min-height: auto;
  }

  .navbar-form {
    margin: 0;
    padding: 7px 4px; // Tweak to match slideovers
  }
}

.allocation-container {
  padding-top: 65px; // Need to offset the hidden elements from slideover
  padding-bottom: 500px; // Need to offset the adjs panel max height
}

.allocation-messages {
  min-height: 51px; // When the success msg goes away the page shouldn't jump
}

.draw-header {
  @extend .draw-row;

  border-top: 1px solid $input-border-color;
  border-radius: 4px 4px 0 0;
  padding-top: 8px;
}

.draw-row {
  @extend .flex-horizontal;

  background: #fff; // Need to compensate for lack of table background
  border-left: 1px solid $input-border-color;
  border-right: 1px solid $input-border-color;
}

.draw-cell {
  @extend .flex-cell;
  @extend .flex-vertical-center;

  border-bottom: 2px solid $table-border-color;

  &.droppable-cell {
    border-bottom-color: #fff; // Have more contrast in drag/drop UIs
  }
}

.thead {
  border-bottom: 2px solid $table-border-color;
  padding-bottom: $table-cell-padding;
}

.flex-cell {
  min-width: 32px;
}

.importance-container {
  width: 100px;
}

.position-container-C {
  flex: 0 0 170px; // Always be 170px

  &.positions-limited-1 {
    flex: 0 0 100%; // When trainees/panellists are turned off
  }
}

.position-container-P {
  flex: 1; // Grow into remaining space
}

.position-container-T {
  flex: 0 0 170px; // Always be 170px

  &.positions-limited-2 {
    flex: 0 0 100%; // When trainees/panellists are turned off
  }
}

//------------------------------------------------------------------------------
// History tooltip elements
//------------------------------------------------------------------------------

// For showing inline time since history conflict
.history-tooltip {
  font-size: 9px;
  line-height: 10px;
  opacity: 1;
  z-index: $z_3; // Knock back from default so it doesnt clash with modals etc
  position: absolute;
  bottom: -3px;
  right: -3px;

  .tooltip-inner {
    padding: 4px 4px;
    margin-bottom: -4px;
  }
}

// Parent element to keep the tooltips abs positioning in line
.tooltip-holder {
  position: relative;
}

.panel-incomplete {
  background: $incomplete-panel;

  &.btn {
    color: #fff;
  }
}

//------------------------------------------------------------------------------
// Debate Layout
//------------------------------------------------------------------------------

.draw-team-cell {

  > div {
    width: 100%;
    height: 100%;
    align-items: center;
    display: flex;
    padding: 0 5px;
    position: relative; // Needs to be for the hover history tooltip

    > div.small {
      width: 100%;
    }
  }

  > .conflictable {
    // Team cells need some border state for in panel conflicts
    border-color: #fff;
    border-width: 4px;
    border-style: solid;

    > div {
      line-height: 16px; // Prevent massive line wraps
    }
  }
}

.panel-debate {
  // Overwrite .panel defaults
  box-shadow: 0;
  margin-bottom: 0;
}

.positions-parent > div {
  border-left: 2px solid $table-border-color;
  min-height: 50px; // Dont let it collapse when no adjs are present
  &:first-child {
    border-left: 0;
  }
}
